 <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="{:U('Index/index')}">首页</a><span class="crumb-step">&gt;</span><span class="crumb-step">&gt;</span><span>微信导航设置</span></div>
        </div>
        </div>
		
		<style>
		  .result-content table th,.result-content table td{
 text-align:center;
}
		</style>
       
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="{:U('Wx/addtop')}"><i class="icon-font"></i>新增顶级导航</a>
                       
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>栏目名称</th>
							<th>类别</th>
                            <th>排序</th>
                            <th>操作</th>
                        </tr>
						  <foreach name="re" item="v">
                        <tr>
						    <td ></td>
							<td>
							   <select>
							      <option>链接</option>
								  <option>选择照片</option>
								  <option>回复内容</option>
							   </select>
							</td>
                            <td >
						   {$re.title}
                            </td>
                            <td>
							   
                                <a class="link-update" href="#">修改</a>
                                <a class="link-del" onclick="del({$v.id})" style="cursor:pointer;">删除</a>
                            </td>
                        </tr>
						  </foreach>
                       
                    </table>
                  
                </div>
            </form>
        </div>
    </div>
    <script>
	   function del(i){
	      
		  $.post("{:U('Wxnav/del')}",{"id":i},fundtion(re){
		  
		    if(re.msg==3){
			  
			  alert('该栏目下有子栏目请先删除');
			  return;
			}
			
			if(re.msg==1){
			  
			  alert('删除成功');
			  location.reload();
              return;			
			}
			
			if(re.msg==2){
			
			  alert('删除失败');
			}
		  
		  })
	   
	   
	   }
	</script>